"""
Walk on Rauzy Graphs

    The aim of a walk is to construct a language from choices of bispecials
    bifurcations. This is better understood with vocabulary and tools of Rauzy
    Graphs.

    What a walk must allow :
        probabilistic choices
        constrained choices (by complexity, by type of bifurcation, by type of
        authorized graphs, ...)
    """

import shape_of_rauzy_graph as srg


class Historic(object):
    """
    Storage of the begining of the walk.

    What is stored (or not) :
    the preceding graphs 
    the preceding position of vertices for plotting
    the obtained modified length on vertices
    """
    def __init__(self, 
            store_graphs=True, 
            store_positions=False,
            store_substitution_independently=False,
            ):
        """
        Constructor
        """
        pass

    def __len__(self):
        return len(l)


class Walk(Historic, Representation):
    """
    Interactive object to perform a walk in the Graph of Rauzy Graphs.

        The walk construct a part of the Graph of Rauzy Graphs consisting of
        vertices still visited.
    """

    def __init__(self, start = None):
        """
        Constructor.
        """
        # The object defining the current possible bifurcation
        self.__D = self.__G.derive()

        # The current graph of Rauzy Graphs
        self.__Graph_of_RauzyGraphs = 0

        # The walk in this graph (pointers to gorg)
        self.__walk
    
    
    def extend_to_linear_complexity(self,n):
        """
        Extend the buffer gorg with the collection of Graphs of linear complexity n.
        """
        pass

    def extend_to_direct_neighbors(self):
        """
        Extend the buffer gorg to direct neighbors
        """
        pass
    

    def show(self):
        """
        Shows the actual graph.
        """
        print self.__G

    def show_derive(self):
        """
        Shows the actual derived graph.
        """
        print self.__D
        
    
